package Oop.ooptest.test04;

public class Dog {
    //定义私有属性
    private String color;
    private int age;



    private String name;
    private float price;
    public static String country = "小日子过得不错的小日本子";
    //设置对应的构造函数，来做属性的初始化
    //空构造函数，不对任何属性进行赋值操作，要求在创建有参构造函数的时候，也需要创建空构造函数
    //alt+insert快捷键生成
    public Dog() {
    }
    //有参构造，当有参数时调用会调用到这个
    public Dog(String color, int age, String name, float price) {
        this.color = color;
        this.age = age;
        this.name = name;
        this.price = price;
    }
    //创建声明一个静态函数
    public static void eat(){
        System.out.println("狗喜欢吃骨头");
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }
}
